package com.qianfeng.exam.mapper;

import com.qianfeng.exam.dto.UserDto;
import com.qianfeng.exam.pojo.Users;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface UserMapper {
    @Select("select * from users")
    List<Users> findAllUsers();

    @Insert("insert into users (username,password,passwordsalt)value(#{username},#{password},#{passwordsalt})")
    void addUser(UserDto user);
}
